import 'package:flutter/material.dart';

void main() {
  // 1. 运行应用程序。
  runApp(MaterialApp(
      home: Scaffold(
    appBar: AppBar(
      title: const Text('你好'),
      backgroundColor: Colors.purple,
    ),
    body: const MyApp(),
  )));
}

// 无状态组件
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const Center(
      child: Text('无状态组件'),
    );
  }
}
